package com.itisyue.fun.utils;

import com.alibaba.fastjson.JSONObject;

import java.util.Date;

public class UmpUtil {
//    private static String emailSMTPHost = "smtp.qq.com";
//    private static String sendMail = "854289665@qq.com";
//    private static String sendMailPassword = "dwtuhhmeqnyzbeif";
//    private static String receiveMail = "854289665@qq.com";

    public static void alarm(String key, String title, String content) throws Exception{
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("key",key);
        jsonObject.put("title",title);
        jsonObject.put("content",content);

        try{
            JSONObject result = HttpUtil.doPostForJson("http://127.0.0.1:802/ump", jsonObject.toJSONString());
            System.out.println(result);
        }catch (Exception e){

        }

    }
    public static void main(String[] args) throws Exception {
        alarm("123.456", "测试邮件"+DateUtil.dateToStr(new Date(), DateUtil.DATE_FORMAT_4), "这是一封测试邮件<h1>这是测试邮件哈</h1>");
    }
}
